{% load static %}
{% load home_content_tags %}

{% include "home/include/top.html" %}
<title>{{ catename }}</title>
<meta name="keywords" content="{{ webconfig.seo_key }}">
<meta name="description" content="{{ webconfig.seo_desc }}">
<link rel="shortcut icon" href="{% static '/favicon.ico' %}"/>
<link rel="bookmark" href="{% static '/favicon.ico' %}"/>
</head>
<body>
{% include "home/include/head.html" %}
{% include "home/include/banner_inner.html" %}
<div class="container">
    <div class="width ui-row">
        <div class="container-left">
            <div class="ui-fixed-s" data-parent=".container">
                {% include "home/include/left_nav.html" %}
            </div>
        </div>
        
        <div class="container-right">
        
            <div class="ui-box">
                <div class="ui-box-h2">{{catename}}</div>
                <div class="ui-box-body">
                    <!---->
                    {% include "home/include/content/job/form.html" %}
                    <!---->
                </div>
            </div>
        
        </div>
    </div>
</div>
{% include "home/include/foot.html" %}
<script>
    $(function()
    {
        $("#verify").click(function()
        {
            $.get('/captcha/refresh/', function (data) {
                $('#captcha_0').attr('value', data.key);
                $('#verify').attr('src', data.image_url);
            });
            $("#code").val("");
        });
        $(".ui-form").form(
        {
            type:2,
            align:'center',
            result:function(form)
            {
                $.ajax(
                {
                    type:'post',
                    cache:false,
                    dataType:'json',
                    url:'/job/form/',
                    data:$(form).serialize(),
                    error:function(e){alert(e.responseText);},
                    success:function(d)
                    {
                        if(d.state=='success')
                        {
                            wmcms.success(d.msg);
                            setTimeout(function(){location.href='/job/form/?jobname={{jobname}}';},1500);
                        }
                        else
                        {
                            $("#verify").click();
                            wmcms.error(d.msg);
                        }
                    }
                });
            }
        });
    });
</script>
</body>
</html>